﻿function isMaxLength(obj, maxlenght) {
    var mlength = parseInt(maxlenght)
    if (obj.getAttribute && obj.value.length > mlength)
        obj.value = obj.value.substring(0, mlength)
};

function setCssClass(controlId, cssClass) {
    var control = document.getElementById(controlId);
    control.className = cssClass;
};
